package com.cntcdt.api.db.model;

import java.io.Serializable;
import java.sql.ResultSet;

import com.cntcdt.api.db.model.base.CheckHistoryModelBase;

/**
 * 这是cdt_check_history的数据传输对象类<br>
 */
public class CheckHistoryModel extends CheckHistoryModelBase implements Serializable {

	private String cdbSimple;
	
    private static final long serialVersionUID = 1L;
    /**
     *  默认构造方法,构造一个默认的CheckHistoryModel对象
     */
    public CheckHistoryModel() {
    }

    /**
     *  构造函数
     *  @param rs 数据库查询结果集
     */
    public CheckHistoryModel(ResultSet rs){
          super(rs);
    }

	@Override
	public String toString() {
		return "CheckHistoryModel [getConsumeFreeTime()="
				+ getConsumeFreeTime() + ", getFactOvertimeMoney()="
				+ getFactOvertimeMoney() + ", getId()=" + getId()
				+ ", getUserId()=" + getUserId() + ", getType()=" + getType()
				+ ", getToUserId()=" + getToUserId() + ", getStatus()="
				+ getStatus() + ", getMessage()=" + getMessage()
				+ ", getAddTime()=" + getAddTime() + ", getUpdateTime()="
				+ getUpdateTime() + ", getSortTime()=" + getSortTime()
				+ ", getShopId()=" + getShopId() + ", getExpires()="
				+ getExpires() + ", getCdb()=" + getCdb()
				+ ", getDeviceTerminal()=" + getDeviceTerminal()
				+ ", getTaskId()=" + getTaskId() + ", hashCode()=" + hashCode()
				+ ", getSourceUserId()=" + getSourceUserId() + ", getName()="
				+ getName() + ", getReturnTime()=" + getReturnTime()
				+ ", getPreMoney()=" + getPreMoney() + ", getOvertimeMoney()="
				+ getOvertimeMoney() + ", getPushHour()=" + getPushHour()
				+ ", getGiveBackShopId()=" + getGiveBackShopId()
				+ ", getUserIdOld()=" + getUserIdOld() + "]";
	}

	public String getCdbSimple() {
		
		if(this.getCdb() !=null){
			String cdbSimple = this.getCdb();
			while(cdbSimple.startsWith("0")){
				cdbSimple = cdbSimple.substring(1);
			}
			return cdbSimple;
		}
		
		return cdbSimple;
	}

	public void setCdbSimple(String cdbSimple) {
		this.cdbSimple = cdbSimple;
	}
}
